package com.blb.community.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 房屋绑定记录表 
 * </p>
 *
 * @author 帅帅
 * @since 2022-07-02
 */
@TableName("zy_owner_room_record")
@ApiModel(value = "ZyOwnerRoomRecord对象", description = "房屋绑定记录表 ")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ZyOwnerRoomRecord implements Serializable {

    private static final long serialVersionUID = 1L;
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("房屋绑定记录id")
    @TableId(type = IdType.ASSIGN_ID)
    private Long recordId;
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("房屋绑定id")
    private String ownerRoomId;
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("小区id")
    private Long communityId;
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("楼栋id")
    private Long buildingId;
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("单元id")
    private Long unitId;
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("房间id")
    private Long roomId;

    @ApiModelProperty("业主id")
    private Long ownerId;

    @ApiModelProperty("业主类型")
    private String ownerType;

    @ApiModelProperty("绑定状态（0审核中 1绑定 2审核失败,3解绑）")
    private String roomStatus;

    @ApiModelProperty("审核意见")
    private String recordAuditOpinion;

    @ApiModelProperty("审核人类型")
    private String recordAuditType;

    @TableField(fill = FieldFill.INSERT)
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("创建人id")
    private String createById;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建者")
    private String createBy;

    @TableField(fill = FieldFill.INSERT)
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("更新者")
    private String updateBy;
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty("备注")
    private String remark;

}
